/**
 * 报价审核
 * Created by douxc on 2015/4/22.
 */
define(function (require, exports, module) {
  'use strict';
  module.exports = function (app) {
    app.register.controller('VerifyQuoteDetailCtrl', ['$scope', '$routeParams', 'MHService',
      function ($scope, $routeParams, MHService) {
        MHService.getReq({url: MHService.URL.verify_detail + '?id=' + $routeParams['flag']}, function (data) {
          $scope.verify = data['datas'][0];
          if ($scope.verify.status === 1) {
            MHService.cacheData(true, {key: 'currentVerify', value: 'needVerify'});
          } else {
            MHService.cacheData(true, {key: 'currentVerify', value: 'hasVerify'});
          }
        });
        $scope.verifyId = $routeParams['flag'];
      }]);
  };
});
